version(1);
project_name = "Lumos";
open_recursively = true;

patterns = {
    "*.c", "*.cpp", "*.h", "*.hpp", "*.m", "*.mm",
    "*.bat", "*.sh",
    "*.glsl", "*.glslh", "*.4coder", "*.vert", "*.frag", "*.comp", "*.shader",
    "*.lua",
};

load_paths_base = {
    { "./Lumos/Source", .relative = true, .recursive = true, },
    { "./Lumos/Assets/Shaders", .relative = true, .recursive = true, },
    { "./Runtime", .relative = true, .recursive = true, },
    { "./Editor", .relative = true, .recursive = true, },
};

load_paths = {
    { load_paths_base, .os = "win", },
    { load_paths_base, .os = "linux", },
    { load_paths_base, .os = "mac", },
};

command_list = {
    { .name = "Build",
        .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = true,
        .cmd = {
            { "Scripts\\Windows\\BuildWindows.bat", .os = "win" },
            { "./Scripts/Linux/BuildLinux.sh", .os = "linux" },
            { "./Scripts/MacOS/BuildMacOS.sh", .os = "mac" },
        },
    },
    
    { .name = "Run",
        .out = "*run*", .footer_panel = true, .save_dirty_files = false, .cursor_at_end = true,
        .cmd = {
            { "bin\\Release-windows-x86_64\\Runtime.exe", .os = "win" },
            { "./Scripts/Linux/RunLinux.sh", .os = "linux" },
            { "./Scripts/MacOS/RunMacOS.sh", .os = "mac" },
        },
    },
    
    { .name = "GenerateProject",
        .out = "*compilation*", .footer_panel = true, .save_dirty_files = false, .cursor_at_end = true,
        .cmd = {
            { "Tools\\premake5.exe vs2022", .os = "win" },
            { "Tools/linux/premake5 gmake2", .os = "linux" },
            { "Tools/premake5 xcode4", .os = "mac" },
        },
    },
	
    { .name = "Clean",
        .out = "*compilation*", .footer_panel = true, .save_dirty_files = false, .cursor_at_end = true,
        .cmd = {
            { "Tools\\premake5.exe clean", .os = "win" },
            { "Tools/linux/premake5 clean", .os = "linux" },
            { "./Scripts/MacOS/CleanMacOS.sh", .os = "mac" },
        },
    },
	
    { .name = "FormatCode",
        .out = "*format*", .footer_panel = true, .save_dirty_files = false, .cursor_at_end = true,
        .cmd = {
            { "Scripts\\Windows\\ClangFormat.bat", .os = "win" },
            { "./Scripts/Linux/ClangFormat.sh", .os = "linux" },
            { "cd Scripts && ./ClangFormat.sh", .os = "mac" },
        },
    },
	
    { .name = "CompileShaders",
        .out = "*compilation*", .footer_panel = true, .save_dirty_files = false, .cursor_at_end = true,
        .cmd = {
            { "Lumos\\Assets\\Shaders\\CompileShadersWindows.bat", .os = "win" },
            { "./Lumos/Assets/Shaders/CompileShadersLinux.sh", .os = "linux" },
            { "./Lumos/Assets/Shaders/CompileShadersMac.sh", .os = "mac" },
        },
    },
	
    { .name = "BuildEditor",
        .out = "*compilation*", .footer_panel = true, .save_dirty_files = true, .cursor_at_end = true,
        .cmd = {
            { "Scripts\\Windows\\BuildWindows-Editor.bat", .os = "win" },
            { "./Scripts/Linux/BuildLinux-Editor.sh", .os = "linux" },
            { "./Scripts/MacOS/BuildMacOS-Editor.sh", .os = "mac" },
        },
    },
	
    { .name = "RunEditor",
        .out = "*run*", .footer_panel = true, .save_dirty_files = false, .cursor_at_end = false,
        .cmd = {
            { "bin\\Release-windows-x86_64\\LumosEditor.exe", .os = "win" },
            { "./Scripts/Linux/RunLinux-Editor.sh", .os = "linux" },
            { "./Scripts/MacOS/RunMacOS-Editor.sh", .os = "mac" },
        },
    },
	
    { .name = "GitPull",
        .out = "*git*", .footer_panel = true, .save_dirty_files = false, .cursor_at_end = true,
        .cmd = {
            { "git pull", .os = "win" },
            { "git pull", .os = "linux" },
            { "git pull", .os = "mac" },
        },
    },
};

fkey_command[1] = "GenerateProject";
fkey_command[2] = "Build";
fkey_command[3] = "Run";
fkey_command[4] = "Clean";
fkey_command[5] = "CompileShaders";
fkey_command[6] = "FormatCode";
fkey_command[7] = "BuildEditor";
fkey_command[8] = "RunEditor";
fkey_command[9] = "GitPull";